Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bun testnow passes 13/13 tests andtsc --noEmitreports no errors. Before this change, 9 tests failed and there were 5 type errors.api.tsstill imported the old nameuseThrottle, which was renamed. It now importsuseDebounce. The publicuseSearchDebouncealias is unchanged.formatDatenow returnsD/MM/YYYY(e.g.1/03/2024). Theen-AUlocale zero-pads the day, which the test rejects, so the leading zero is removed.aria-labelis now passed through to the<button>. An icon-only button with no label getsaria-label=""and logs a warning outside production.setStateform. The tests also pass without this change; see Assumptions.environment = "happy-dom"withpreloadof the existing happy-dom setup file. Without it, the DOM tests had nodocument."types": ["bun-types"](already innode_modules) to fix thebun:testtype errors.// BUG:comments from the source files.Assumptions and notes
aria-label=""fallback only satisfies the test (not.toBeNull()). An empty label gives screen readers no name, so the button still fails WCAG 4.1.2. The new warning flags it, but callers need to pass a real label.handleSortis rebuilt on every render. It is kept because the task named a stale-closure issue here.process.env.NODE_ENV, which assumes the bundler replaces it at build time (Next does). If the package is ever served without that replacement, every Button render will throw. Adding atypeof process !== "undefined"check would remove that risk; it is not in this PR.formatDatecallers now get1/03/2024instead of01/03/2024.